//
//  NetWorkRequest.h
//  SFASalesReport
//
//  Created by Jonas on 16/8/23.
//  Copyright © 2016年 Jonas. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetWorking.h"
#import "HelpObject.h"
#import "AppSetting.h"
#import "UIViewController+MBProgressHUD.h"
#import "MJRefresh.h"
#import "UIImageView+WebCache.h"
#import "BOHUDManager.h"
#import "BONoticeBar.h"

@interface NetWorkRequest : NSObject

@property (nonatomic,strong)AFHTTPSessionManager *manager;

@property (nonatomic,strong)NSMutableArray *taskArray;//保存task的数组

//get方法
+ (void)getNetRequestData:(NSString *)getNet parmeters:(NSDictionary *)parmeters response:(void(^)(NSDictionary * response))response netError:(void(^)(NSError * error))netError;


/**
 使用原始url-------
 */
+ (void)getOriginUrl:(NSString *)urlStr parmeters:(NSDictionary *)parmeters response:(void(^)(NSDictionary *))response netError:(void(^)(NSError *))netError;

//post方法
+ (void)postNetRequestData:(NSString *)getNet parmeters:(NSDictionary *)parmeters response:(void(^)(NSDictionary * response))response netError:(void(^)(NSError * error))netError;


//上传数据 有图片时
+ (void)uplodaDataNet:(NSString *)uploadNet parmeters:(NSDictionary *)parmeters imageMutableArray:(NSMutableArray *)imageMutableArray response:(void(^)(NSDictionary * response))response netError:(void(^)(NSError * error))netError;

//网络请求错误信息
+ (void)afnetWorkingErrorMessge:(NSError *)errorMessge;


//登录方法
+ (void)logInResponseParmeters:(NSDictionary *)parmeters response:(void(^)(NSDictionary *response))response netError:(void(^)(NSError *error))netError;

//使用测试地址判断是否联网了------------------
+ (BOOL)networkConnectionIsAvailable;

+ (UIImage *)fixOrientation:(UIImage *)aImage;

+ (void)cancel;
@end
